/*
 * @Author: codeD
 * @Date: 2022-02-17 19:11:44
 * @LastEditors: codeD
 * @LastEditTime: 2022-02-19 14:55:44
 * @Description: file content
 * @FilePath: \wpt\src\App.tsx
 */
import React from "react";

// import ReactDOM from "react-dom";

import { Provider } from "react-redux";
import Router from "./router";
import Navigator from "./components/Navigator";
import {useNavigator} from './App.effect'
import store from "./store";

import { MENE_LIST } from './config'
import styles from "./App.module.css";




function App() {
  const { current, handleNavigatorRouter, isShow } = useNavigator();

  return (
    <Provider store={store}>
       <Router key={current} /> 

      <div className={styles["navigator-wrap"]}>
        <Navigator
          dataSource={MENE_LIST}
          onSearch={handleNavigatorRouter}
          current={current}
          isShow={isShow}
        />
      </div>
    </Provider>
  );
}

export default App;
